/***********************************************************************
    filename:   DaterGroupEventEditWindow.h
    created:    10/4/2012
    author:     4Ys

    purpose:    Defines class for Window objects in UI
*************************************************************************/
#ifndef _DaterGroupEventEditWindow_h_
#define _DaterGroupEventEditWindow_h_

#include "DaterBaseWindow.h"
#include "DaterGroupEventMap.h"
#include "DaterGroup.h"

class GroupEventEditWindow : public BaseWindow
{
	/* !
	\brief
		The Group Event Edit Window.
	*/
public:
		/* !
		\brief
			Construct the sample of class GroupEventEditWindow.

		\param id_name
			- a string to represent the prefix of the window.
			
		\param parent
			- point to parent window.
		*/
	GroupEventEditWindow(const CEGUI::String& id_name, CEGUI::Window* parent = 0);
		
		/* !
			Destructor of class GroupEventEditWindow.
		*/
	virtual ~GroupEventEditWindow();
	
		/* !
		\brief
			a virtual function generated from class BaseWindow to hide window.
		*/
	virtual void hideWindow();

		/* !
		\brief
			a virtual function to show window with a group ID.
			
		\param relatedGroupID
		*/
	void showWindow(int relatedGroupID);
	
		/* !
		\brief
			a virtual function to show window with a related Group Event Map.
			
		\param relatedGroupEventMap
		*/
	void showWindow(Dater::GroupEventMap* relatedGroupEventMap);

private:
		/* !
		\brief
			Handle the process and close the button.
			
		\param args
			- the processing program.
		*/
	bool handle_CloseButton(const CEGUI::EventArgs& args);

		/* !
		\brief
			Handle the process and submit.
			
		\param args
			- the processing program.
		*/
	bool handle_Submit(const CEGUI::EventArgs& args);

		/* !
		\brief
			Refresh the input window.
		*/
	void refreshInputWindow();

		/* !
		\brief
			a virtual function to show the window.
		*/
	virtual void showWindow();

		//! A map contains related group events of a certain group.
	Dater::GroupEventMap* _relatedGroupEventMap;
	
		//! An int represent the group ID.
	int _relatedGroupID;
	
		//! Represent whether the group is changable.
	bool _ableToChange;
};

#endif